package com.company.cloud.product.modules.api.fallback;


import java.util.List;
import java.util.Map;
import java.util.Set;

import org.springframework.stereotype.Component;

import com.company.cloud.common.bean.BaseClientResult;
import com.company.cloud.product.modules.api.request.ProductQuery4PageRequest;
import com.company.cloud.product.modules.api.request.ProductQueryRequest;
import com.company.cloud.product.modules.api.response.Product;
import com.company.cloud.product.modules.api.response.ProductQuery4PageResponse;
import com.company.cloud.product.modules.api.response.ProductSimple;
import com.company.cloud.product.modules.api.response.Sku;
import com.company.cloud.product.modules.api.service.ProductRemoteService;

import feign.hystrix.FallbackFactory;
import lombok.extern.log4j.Log4j2;

@Log4j2
@Component
public class ProductRemoteServiceFallbackFactory implements FallbackFactory<ProductRemoteService>{

	@Override
	public ProductRemoteService create(Throwable cause) {
		return new ProductRemoteService() {

			@SuppressWarnings("unchecked")
			@Override
			public BaseClientResult<Product> getProductById(String productNo) {
				return BaseClientResult.callbackError();
			}

			@SuppressWarnings("unchecked")
			@Override
			public BaseClientResult<Map<String, Product>> getProductMapByIds(Set<String> productNos) {
				return BaseClientResult.callbackError();
			}

			@SuppressWarnings("unchecked")
			@Override
			public BaseClientResult<List<Product>> getProductListByIds(Set<String> productNos) {
				return  BaseClientResult.callbackError();
			}

			@SuppressWarnings("unchecked")
			@Override
			public BaseClientResult<Product> getProductByDbById(String productNo) {
				return  BaseClientResult.callbackError();
			}

			@SuppressWarnings("unchecked")
			@Override
			public BaseClientResult<Map<String, Product>> getProductMapByDbByIds(Set<String> productNos) {
				return  BaseClientResult.callbackError();
			}

			@SuppressWarnings("unchecked")
			@Override
			public BaseClientResult<List<Product>> getProductListByDbByIds(Set<String> productNos) {
				return  BaseClientResult.callbackError();
			}

			@SuppressWarnings("unchecked")
			@Override
			public BaseClientResult<ProductSimple> getProductSimpleById(String productNo) {
				return  BaseClientResult.callbackError();
			}

			@SuppressWarnings("unchecked")
			@Override
			public BaseClientResult<Map<String, ProductSimple>> getProductSimpleMapByIds(Set<String> productNos) {
				return  BaseClientResult.callbackError();
			}

			@SuppressWarnings("unchecked")
			@Override
			public BaseClientResult<List<ProductSimple>> getProductSimplListByIds(Set<String> productNos) {
				return  BaseClientResult.callbackError();
			}

			@SuppressWarnings("unchecked")
			@Override
			public BaseClientResult<ProductSimple> getProductSimpleByDbById(String productNo) {
				return  BaseClientResult.callbackError();
			}

			@SuppressWarnings("unchecked")
			@Override
			public BaseClientResult<Map<String, ProductSimple>> getProductSimpleMapByDbByIds(Set<String> productNos) {
				return  BaseClientResult.callbackError();
			}

			@SuppressWarnings("unchecked")
			@Override
			public BaseClientResult<List<ProductSimple>> getProductSimplListByDbByIds(Set<String> productNos) {
				return  BaseClientResult.callbackError();
			}

			@SuppressWarnings("unchecked")
			@Override
			public BaseClientResult<List<Product>> queryProductSimple(ProductQueryRequest request) {
				return  BaseClientResult.callbackError();
			}

			@SuppressWarnings("unchecked")
			@Override
			public BaseClientResult<ProductQuery4PageResponse> queryProductSimple4Page(
					ProductQuery4PageRequest request) {
				return  BaseClientResult.callbackError();
			}

			@SuppressWarnings("unchecked")
			@Override
			public BaseClientResult<Map<String, Sku>> getSkuMapByNos(Set<String> skuNos) {
				return  BaseClientResult.callbackError();
			}

			@SuppressWarnings("unchecked")
			@Override
			public BaseClientResult<Map<String, Sku>> getSkuMapByCacheByNos(Set<String> skuNos) {
				return  BaseClientResult.callbackError();
			}

			@SuppressWarnings("unchecked")
			@Override
			public BaseClientResult<Map<String, Sku>> getSkuMapByDbByNos(Set<String> skuNos) {
				return  BaseClientResult.callbackError();
			}
			

		};
	}

	
}
